﻿using System;
using System.Collections.Generic;
using System.Text;
using umbraco.interfaces;
using umbraco;
using System.Web;
using umbraco.BasePages;

namespace TheOutfield.UmbExt.DocTypeExtensions.Actions
{
    public class OpenAssociatedDocType : IAction
    {
        //create singleton
        private static readonly OpenAssociatedDocType _instance = new OpenAssociatedDocType();

        private OpenAssociatedDocType() { }

        public static OpenAssociatedDocType Instance
        {
            get { return _instance; }
        }

        #region IAction Members

        public char Letter
        {
            get
            {
                return '¿';
            }
        }

        public string JsFunctionName
        {
            get
            {
                return "OpenDocTypeHandler();";

            }
        }

        public string JsSource
        {
            get
            {
                return "/umbraco/theoutfield/doctypeextensions/scripts/doctypeextensions.js";
            }
        }

        public string Alias
        {
            get
            {
                return "Open Associated DocType";
            }
        }

        public string Icon
        {
            get
            {
                return string.Format(".sprDummy' style='background: transparent url({0}) center center no-repeat", umbraco.GlobalSettings.Path + "/images/umbraco/settingDatatype.gif");
            }
        }

        public bool ShowInNotifier
        {
            get
            {
                return true;
            }
        }
        public bool CanBePermissionAssigned
        {
            get
            {
                return false;
            }
        }
        #endregion
    }
}
